xend: fix BlktapController's device creation
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 19 Jun 2009 07:43:28 +0000 (08:43 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 19 Jun 2009 07:43:28 +0000 (08:43 +0100)
Reset BlktapController's device class back to 'tap' once the device
has been created. This fixes save/restore for VMs with blktap2 disks.

Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
Signed-off-by: Dutch Meyer <dmeyer@cs.ubc.ca>
tools/python/xen/xend/server/BlktapController.py

index 24d96ee5817bf2e746becfec1968d135ea662409..2e6c93a896de4d64e683df6ae863f3a0f614aa98 100644 (file)
@@ -159,6 +159,8 @@ class BlktapController(BlkifController):
         #modify the configuration to attach as a vbd, now that the
         #device is configured.  Then continue to create the device
         config.update({'uname' : 'phy:' + device.rstrip()})
-        self.deviceClass='vbd'
 
-        return BlkifController.createDevice(self, config);
+        self.deviceClass='vbd'
+        devid = BlkifController.createDevice(self, config)
+        self.deviceClass='tap'
+        return devid